package com.king.login.controller;

import com.king.login.entity.SystemUser;
import com.king.login.service.LoginService;
import com.king.platform.entity.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/loginAuth")
public class LoginController {
  @Autowired
  LoginService loginService;

  @PostMapping("/login")
  public BaseResult login(@RequestBody SystemUser systemUser) {
    return loginService.login(systemUser);
  }
}
